<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>客服聊天管理后台 - 金零社</title>
    <!-- 使用本地Font Awesome替代CDN -->
    <link href="../../static/element/font-awesome.css" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: #1a1a2e;
            color: #e2e8f0;
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        /* 聊天管理应用容器 */
        .chat-manage-app {
            display: flex;
            flex-direction: column;
            height: 100vh;
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            background-color: #1e293b;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
        }

        /* 顶部导航 */
        .chat-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 20px;
            background: linear-gradient(135deg, #9C27B0, #7B1FA2);
            color: white;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .chat-icon {
            font-size: 24px;
            background-color: white;
            color: #9C27B0;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .chat-title {
            font-size: 18px;
            font-weight: 600;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        /* 在线用户列表区域 */
        .online-users-panel {
            width: 300px;
            background-color: #1e293b;
            border-right: 1px solid #334155;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .panel-header {
            padding: 15px;
            background-color: #334155;
            border-bottom: 1px solid #475569;
            font-weight: 600;
        }

        .online-users-list {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
        }

        .online-user-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .online-user-item:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .online-user-item.active {
            background-color: rgba(156, 39, 176, 0.3);
        }

        .online-user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: #9C27B0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: white;
        }

        .online-user-info {
            flex: 1;
            min-width: 0;
        }

        .online-user-name {
            font-size: 14px;
            color: #E5E7EB;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .online-user-status {
            font-size: 12px;
            color: #10B981;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .online-user-status::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: #10B981;
        }

        /* 主聊天区域 */
        .main-content {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        .chat-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .chat-header-info {
            padding: 15px;
            background-color: #334155;
            border-bottom: 1px solid #475569;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chat-header-info .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #9C27B0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: white;
        }

        .chat-header-info .user-info {
            flex: 1;
        }

        .chat-header-info .user-name {
            font-size: 16px;
            font-weight: 600;
            color: #E5E7EB;
        }

        .chat-header-info .user-details {
            font-size: 12px;
            color: #94a3b8;
        }

        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background-color: #1e293b;
        }

        /* 系统消息 */
        .system-message {
            text-align: center;
            color: #94a3b8;
            font-size: 14px;
            margin: 10px 0;
        }

        .system-message span {
            display: inline-block;
            padding: 5px 10px;
            background-color: rgba(156, 39, 176, 0.2);
            border-radius: 12px;
            color: #e2e8f0;
        }

        /* 消息行容器 */
        .message-row {
            display: flex;
            margin-bottom: 15px;
            animation: fadeIn 0.3s ease;
        }

        .message-row.my-message {
            justify-content: flex-end;
        }

        .message-row.other-message {
            justify-content: flex-start;
        }

        /* 头像 */
        .message-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            margin-right: 8px;
            background-color: #ccc;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            background-size: cover;
            background-position: center;
        }

        .message-row.my-message .message-avatar {
            margin-right: 0;
            margin-left: 8px;
        }

        /* 消息气泡容器 */
        .message-content {
            max-width: 70%;
            display: flex;
            flex-direction: column;
        }

        .message-row.my-message .message-content {
            align-items: flex-end;
        }

        .message-row.other-message .message-content {
            align-items: flex-start;
        }

        /* 用户名 */
        .message-username {
            font-size: 12px;
            color: #94a3b8;
            margin-bottom: 4px;
            padding: 0 10px;
        }

        /* 消息气泡 */
        .message-bubble {
            padding: 10px 15px;
            border-radius: 18px;
            position: relative;
            word-wrap: break-word;
            line-height: 1.4;
            max-width: 100%;
        }

        .message-row.my-message .message-bubble {
            background-color: #7B1FA2;
            border-bottom-right-radius: 4px;
            color: #fff;
        }

        .message-row.other-message .message-bubble {
            background-color: #334155;
            border-bottom-left-radius: 4px;
            color: #e2e8f0;
        }

        /* 时间 */
        .message-time {
            font-size: 11px;
            color: #64748b;
            margin-top: 4px;
            padding: 0 10px;
        }

        /* 输入区域 */
        .chat-input {
            padding: 15px 20px;
            background-color: #1e293b;
            border-top: 1px solid #334155;
        }

        .input-container {
            display: flex;
            align-items: flex-end;
            gap: 10px;
            background-color: #334155;
            border-radius: 24px;
            padding: 5px 15px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        }

        .message-input {
            flex: 1;
            border: none;
            outline: none;
            padding: 10px 0;
            font-size: 15px;
            resize: none;
            max-height: 100px;
            overflow-y: auto;
            background-color: #334155;
            color: #e2e8f0;
        }

        .send-button {
            background: linear-gradient(135deg, #9C27B0, #7B1FA2);
            color: white;
            border: none;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .send-button:hover {
            background: linear-gradient(135deg, #7B1FA2, #9C27B0);
        }

        .send-button i {
            font-size: 16px;
        }

        /* 登录表单 */
        .login-form {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100%;
            padding: 20px;
            background-color: #1e293b;
        }

        .login-form .form-container {
            background-color: #334155;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
            width: 100%;
            max-width: 400px;
        }

        .login-form h2 {
            text-align: center;
            margin-bottom: 25px;
            color: #e2e8f0;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #cbd5e1;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #475569;
            background-color: #1e293b;
            color: #e2e8f0;
            font-size: 16px;
        }

        .form-group input:focus {
            outline: none;
            border-color: #9C27B0;
        }

        .login-button {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, #9C27B0, #7B1FA2);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .login-button:hover {
            background: linear-gradient(135deg, #7B1FA2, #9C27B0);
        }

        .login-error {
            color: #ef4444;
            text-align: center;
            margin-top: 15px;
            display: none;
        }

        /* 动画 */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 滚动条样式 */
        .online-users-list::-webkit-scrollbar,
        .chat-messages::-webkit-scrollbar {
            width: 6px;
        }

        .online-users-list::-webkit-scrollbar-track,
        .chat-messages::-webkit-scrollbar-track {
            background: transparent;
        }

        .online-users-list::-webkit-scrollbar-thumb,
        .chat-messages::-webkit-scrollbar-thumb {
            background: rgba(156, 39, 176, 0.3);
            border-radius: 3px;
        }

        .online-users-list::-webkit-scrollbar-thumb:hover,
        .chat-messages::-webkit-scrollbar-thumb:hover {
            background: rgba(156, 39, 176, 0.5);
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .main-content {
                flex-direction: column;
            }

            .online-users-panel {
                width: 100%;
                height: 200px;
                border-right: none;
                border-bottom: 1px solid #334155;
            }

            .message-content {
                max-width: 85%;
            }

            .chat-header {
                padding: 10px 15px;
            }

            .chat-messages {
                padding: 15px;
            }

            .chat-input {
                padding: 10px 15px;
            }
        }
    </style>
</head>
<body>
    <!-- 聊天管理应用容器 -->
    <div class="chat-manage-app" id="chatManageApp">
        <!-- 顶部导航 -->
        <div class="chat-header">
            <div class="header-left">
                <div class="chat-icon">
                    <i class="fas fa-headset"></i>
                </div>
                <div class="chat-title">客服聊天管理后台</div>
            </div>
            <div class="header-right">
                <div id="adminInfo" style="display: none;">
                    <span id="adminName"></span>
                    <button id="logoutBtn" style="margin-left: 10px; background: rgba(255,255,255,0.2); border: none; color: white; padding: 5px 10px; border-radius: 4px; cursor: pointer;">退出</button>
                </div>
            </div>
        </div>

        <!-- 登录表单 -->
        <div class="login-form" id="loginForm">
            <div class="form-container">
                <h2>客服后台登录</h2>
                <div class="form-group">
                    <label for="adminId">客服ID</label>
                    <input type="text" id="adminId" placeholder="请输入客服ID">
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" id="password" placeholder="请输入密码">
                </div>
                <button class="login-button" id="loginBtn">登录</button>
                <div class="login-error" id="loginError"></div>
            </div>
        </div>

        <!-- 主内容区域 -->
        <div class="main-content" id="mainContent" style="display: none;">
            <!-- 在线用户列表 -->
            <div class="online-users-panel">
                <div class="panel-header">在线用户</div>
                <div class="online-users-list" id="onlineUsersList">
                    <!-- 在线用户列表将通过JavaScript动态填充 -->
                </div>
            </div>

            <!-- 聊天区域 -->
            <div class="chat-area">
                <div class="chat-header-info" id="chatHeaderInfo">
                    <div class="user-avatar" id="chatUserAvatar">U</div>
                    <div class="user-info">
                        <div class="user-name" id="chatUserName">请选择用户开始聊天</div>
                        <div class="user-details" id="chatUserDetails">-</div>
                    </div>
                </div>
                <div class="chat-messages" id="messageContainer">
                    <div class="system-message">
                        <span>请选择一个用户开始聊天</span>
                    </div>
                </div>
                <div class="chat-input">
                    <div class="input-container">
                        <textarea class="message-input" id="messageInput" placeholder="输入消息..." rows="1" disabled></textarea>
                        <button class="send-button" id="sendButton" title="发送消息" disabled>
                            <i class="fas fa-paper-plane"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 全局ESC键监听脚本 -->
    <script src="../../../js/global_escape_listener.js"></script>
    <script>
        // 全局变量
        let currentAdmin = null;
        let currentChatUser = null;
        let onlineUsers = [];
        let chatMessages = {};

        // DOM元素
        const loginForm = document.getElementById('loginForm');
        const mainContent = document.getElementById('mainContent');
        const adminInfo = document.getElementById('adminInfo');
        const adminName = document.getElementById('adminName');
        const loginBtn = document.getElementById('loginBtn');
        const logoutBtn = document.getElementById('logoutBtn');
        const loginError = document.getElementById('loginError');
        const onlineUsersList = document.getElementById('onlineUsersList');
        const chatHeaderInfo = document.getElementById('chatHeaderInfo');
        const chatUserAvatar = document.getElementById('chatUserAvatar');
        const chatUserName = document.getElementById('chatUserName');
        const chatUserDetails = document.getElementById('chatUserDetails');
        const messageContainer = document.getElementById('messageContainer');
        const messageInput = document.getElementById('messageInput');
        const sendButton = document.getElementById('sendButton');

        // 登录事件
        loginBtn.addEventListener('click', function() {
            const adminId = document.getElementById('adminId').value.trim();
            const password = document.getElementById('password').value.trim();
            
            // 简单验证（实际应用中应连接后端验证）
            if (adminId && password) {
                // 模拟登录验证
                if (password === 'admin123') { // 简单的默认密码，实际应用中应从服务器验证
                    currentAdmin = {
                        id: adminId,
                        name: '客服 ' + adminId
                    };
                    
                    // 显示主界面
                    loginForm.style.display = 'none';
                    mainContent.style.display = 'flex';
                    adminInfo.style.display = 'flex';
                    adminName.textContent = currentAdmin.name;
                    
                    // 初始化客服界面
                    initAdminInterface();
                } else {
                    showError('密码错误');
                }
            } else {
                showError('请输入客服ID和密码');
            }
        });

        // 退出登录
        logoutBtn.addEventListener('click', function() {
            currentAdmin = null;
            currentChatUser = null;
            
            // 显示登录界面
            loginForm.style.display = 'flex';
            mainContent.style.display = 'none';
            adminInfo.style.display = 'none';
            
            // 清空表单
            document.getElementById('adminId').value = '';
            document.getElementById('password').value = '';
            loginError.style.display = 'none';
        });

        // 初始化客服界面
        function initAdminInterface() {
            // 加载在线用户列表
            loadOnlineUsers();
            
            // 定期更新在线用户列表
            setInterval(loadOnlineUsers, 10000); // 每10秒更新一次
            
            // 绑定发送消息事件
            sendButton.addEventListener('click', sendMessage);
            messageInput.addEventListener('keypress', function(e) {
                if (e.key === 'Enter' && !e.shiftKey) {
                    e.preventDefault();
                    sendMessage();
                }
            });
            
            // 检查是否为局域网用户，用于自动登录
            checkAutoLogin();
        }

        // 检查是否可以自动登录（局域网用户）
        function checkAutoLogin() {
            // 获取用户IP信息以判断是否为局域网用户
            fetch('/api/chat/ip-info')
                .then(response => response.json())
                .then(data => {
                    if (data.success && data.data) {
                        const ip = data.data.ip || '';
                        // 检查是否为局域网IP
                        if (isLocalNetworkIP(ip)) {
                            // 自动登录为管理员
                            performAutoLogin();
                        }
                    }
                })
                .catch(error => {
                    console.error('获取IP信息失败:', error);
                });
        }
        
        // 判断是否为局域网IP
        function isLocalNetworkIP(ip) {
            // 局域网IP范围:
            // 10.0.0.0 - 10.255.255.255
            // 172.16.0.0 - 172.31.255.255
            // 192.168.0.0 - 192.168.255.255
            // 127.0.0.0 - 127.255.255.255 (本地回环)
            
            if (!ip) return false;
            
            // 检查IPv4地址
            if (ip.includes('.')) {
                const parts = ip.split('.').map(Number);
                if (parts.length !== 4) return false;
                
                // 10.x.x.x
                if (parts[0] === 10) return true;
                
                // 172.16.x.x - 172.31.x.x
                if (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) return true;
                
                // 192.168.x.x
                if (parts[0] === 192 && parts[1] === 168) return true;
                
                // 127.x.x.x (本地回环)
                if (parts[0] === 127) return true;
                
                return false;
            }
            
            // 对于IPv6，简单检查是否以::1或::ffff:开头
            if (ip.startsWith('::1') || ip.startsWith('::ffff:')) {
                return true;
            }
            
            return false;
        }
        
        // 执行自动登录
        function performAutoLogin() {
            currentAdmin = {
                id: 'admin_' + Date.now(), // 使用时间戳作为唯一ID
                name: '局域网管理员'
            };
            
            // 显示主界面
            loginForm.style.display = 'none';
            mainContent.style.display = 'flex';
            adminInfo.style.display = 'flex';
            adminName.textContent = currentAdmin.name;
            
            // 显示自动登录提示
            const systemMessage = {
                type: 'system',
                content: '检测到您是局域网用户，已自动登录为管理员',
                timestamp: new Date()
            };
            displayMessage(systemMessage);
        }

        // 显示错误信息
        function showError(message) {
            loginError.textContent = message;
            loginError.style.display = 'block';
            
            // 3秒后自动隐藏错误信息
            setTimeout(() => {
                loginError.style.display = 'none';
            }, 3000);
        }

        // 加载在线用户列表
        function loadOnlineUsers() {
            // 模拟从服务器获取在线用户列表
            // 实际应用中应该通过API获取真实数据
            setTimeout(() => {
                // 模拟数据
                const mockUsers = [
                    { userId: 'user_1', nickname: '用户A', province: '北京', lastActive: new Date() },
                    { userId: 'user_2', nickname: '用户B', province: '上海', lastActive: new Date() },
                    { userId: 'user_3', nickname: '用户C', province: '广州', lastActive: new Date() },
                    { userId: 'user_4', nickname: '用户D', province: '深圳', lastActive: new Date() }
                ];
                
                onlineUsers = mockUsers;
                updateOnlineUsersList();
            }, 100);
        }

        // 更新在线用户列表显示
        function updateOnlineUsersList() {
            onlineUsersList.innerHTML = '';
            
            if (onlineUsers.length === 0) {
                onlineUsersList.innerHTML = '<div style="text-align: center; color: #94a3b8; padding: 20px;">暂无在线用户</div>';
                return;
            }
            
            onlineUsers.forEach(user => {
                const userItem = document.createElement('div');
                userItem.className = 'online-user-item';
                if (currentChatUser && currentChatUser.userId === user.userId) {
                    userItem.classList.add('active');
                }
                
                const userInitial = user.nickname.charAt(0).toUpperCase();
                const lastActiveTime = formatTime(user.lastActive);
                
                userItem.innerHTML = `
                    <div class="online-user-avatar">${userInitial}</div>
                    <div class="online-user-info">
                        <div class="online-user-name">${user.nickname}</div>
                        <div class="online-user-status">${user.province} | ${lastActiveTime}</div>
                    </div>
                `;
                
                userItem.addEventListener('click', () => selectUserForChat(user));
                onlineUsersList.appendChild(userItem);
            });
        }

        // 选择用户进行聊天
        function selectUserForChat(user) {
            currentChatUser = user;
            
            // 更新用户列表中的选中状态
            updateOnlineUsersList();
            
            // 更新聊天头部信息
            const userInitial = user.nickname.charAt(0).toUpperCase();
            chatUserAvatar.textContent = userInitial;
            chatUserName.textContent = user.nickname;
            chatUserDetails.textContent = `${user.province} | 最后活跃: ${formatTime(user.lastActive)}`;
            
            // 启用消息输入
            messageInput.disabled = false;
            sendButton.disabled = false;
            messageInput.placeholder = `发送消息给 ${user.nickname}...`;
            
            // 加载聊天记录
            loadChatHistory(user.userId);
        }

        // 加载聊天历史记录
        function loadChatHistory(userId) {
            messageContainer.innerHTML = '';
            
            // 检查是否有缓存的聊天记录
            if (chatMessages[userId]) {
                chatMessages[userId].forEach(message => {
                    displayMessage(message);
                });
            } else {
                // 创建新的聊天记录数组
                chatMessages[userId] = [];
                
                // 显示欢迎消息
                const welcomeMessage = {
                    type: 'system',
                    content: `开始与 ${currentChatUser.nickname} 聊天`,
                    timestamp: new Date()
                };
                displayMessage(welcomeMessage);
            }
            
            // 滚动到底部
            messageContainer.scrollTop = messageContainer.scrollHeight;
        }

        // 发送消息
        function sendMessage() {
            const content = messageInput.value.trim();
            if (!content || !currentChatUser) return;
            
            // 创建消息对象
            const message = {
                type: 'my',
                content: content,
                timestamp: new Date(),
                userId: currentAdmin.id
            };
            
            // 添加到聊天记录
            if (!chatMessages[currentChatUser.userId]) {
                chatMessages[currentChatUser.userId] = [];
            }
            chatMessages[currentChatUser.userId].push(message);
            
            // 显示消息
            displayMessage(message);
            
            // 清空输入框
            messageInput.value = '';
            
            // 滚动到底部
            messageContainer.scrollTop = messageContainer.scrollHeight;
            
            // 模拟回复（实际应用中应通过WebSocket或API发送到服务器）
            setTimeout(() => {
                const replyMessage = {
                    type: 'other',
                    content: `这是${currentChatUser.nickname}的自动回复`,
                    timestamp: new Date(),
                    userId: currentChatUser.userId
                };
                
                if (!chatMessages[currentChatUser.userId]) {
                    chatMessages[currentChatUser.userId] = [];
                }
                chatMessages[currentChatUser.userId].push(replyMessage);
                displayMessage(replyMessage);
                messageContainer.scrollTop = messageContainer.scrollHeight;
            }, 2000);
        }

        // 显示消息
        function displayMessage(message) {
            const messageRow = document.createElement('div');
            
            if (message.type === 'system') {
                // 系统消息
                const systemMessage = document.createElement('div');
                systemMessage.className = 'system-message';
                systemMessage.innerHTML = `<span>${message.content}</span>`;
                messageContainer.appendChild(systemMessage);
                return;
            }
            
            // 用户消息
            messageRow.className = 'message-row ' + (message.type === 'my' ? 'my-message' : 'other-message');
            
            const timeString = formatTime(message.timestamp);
            const userInitial = message.type === 'my' ? currentAdmin.name.charAt(0).toUpperCase() : currentChatUser.nickname.charAt(0).toUpperCase();
            
            const messageHTML = `
                ${message.type !== 'my' ? `<div class="message-avatar" style="background-color: #9C27B0;">${userInitial}</div>` : ''}
                <div class="message-content">
                    ${message.type !== 'my' ? `<div class="message-username">${currentChatUser.nickname}</div>` : ''}
                    <div class="message-bubble">
                        ${message.content}
                    </div>
                    <div class="message-time">${timeString}</div>
                </div>
                ${message.type === 'my' ? `<div class="message-avatar" style="background-color: #7B1FA2;">${userInitial}</div>` : ''}
            `;
            
            messageRow.innerHTML = messageHTML;
            messageContainer.appendChild(messageRow);
        }

        // 格式化时间
        function formatTime(date) {
            const now = new Date();
            const diff = now - date;
            const minutes = Math.floor(diff / 60000);
            
            if (minutes < 1) {
                return '刚刚';
            } else if (minutes < 60) {
                return `${minutes}分钟前`;
            } else {
                const hours = Math.floor(minutes / 60);
                return `${hours}小时前`;
            }
        }

        // 页面加载完成后初始化
        document.addEventListener('DOMContentLoaded', function() {
            // 页面加载完成后可以执行一些初始化操作
            console.log('客服聊天管理后台已加载');
        });
    </script>
</body>
</html>